import Taro from '@tarojs/taro';
import { View } from '@tarojs/components'

import './index.scss'
const Empty = (props) => {
    const { type = 'volunteer', desc = '暂无数据', list = [], children } = props
    const imgObj = {
        volunteer: 'empty_Volunteerbg',
        search: 'empty_search'
    }[type]
    if (list.length > 0) {
        return children
    }
    return <View className='empty_box'>
        <View className={`empty_img ${imgObj}`}>

        </View>
        <View className='empty_desc'>
            {desc}
        </View>
    </View>
}
export default Empty